<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<!--
 * Created on 2010-6-17
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
-->
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <link href="<?php echo $this->baseUrl(); ?>/public/css/style1.css" rel="stylesheet" type="text/css" />
  <title>日志分类</title>
 </head>
 <body>
<?php switch($this->x) : ?>
<?php case 'add' : ?>
<h5>添加分类</h5>
<form action="" method="post" id="add">
<table border="1" bordercolor="#4ab902" cellpadding=3 cellspacing=1 class=css_table bgcolor='#E1E1E1'>
<tr>
	<th>分类名称</th>
	<td><input name="classname" type="text" /></td>
</tr>
<tr>
	<th>备注</th>
	<td><input name="remark" type="text" /></td>
</tr>
<tr>
<td  align="right"><input type="submit" name="add" value="添加"></td><td align="left"><input type="button"  value="取消" onclick="javascript:history.go(-1);"></td>
</tr>
</table>
</form>
<?php break; ?>
<?php case 'edit' : ?>
<h5>编辑分类</h5>
<form action="" method="post" id="edit">
<table border="1" bordercolor="#4ab902" cellpadding=3 cellspacing=1 class=css_table bgcolor='#E1E1E1'>
<tr>
	<th>ID</th>
	<td><?php echo $this->id; ?><input type="hidden" name="id" value="<?php echo $this->id; ?>"></td>
</tr>
<tr>
	<th>用户名</th>
	<td><input name="classname" type="text" value="<?php echo $this->classname; ?>" /></td>
</tr>
<tr>
	<th>密&nbsp码</th>
	<td><input name="remark" type="text" value="<?php echo $this->remark; ?>" /></td>
</tr>
<tr>
<td  align="right"><input type="submit" name="edit" value="编辑"></td><td align="left"><input type="button"  value="取消" onclick="javascript:history.go(-1);"></td>
</tr>
</table>
</form>
<?php break; ?>
<?php default : ?>
 <h5 >分类列表</h5><a href="<?php echo $this->baseUrl; ?>/admin/classes/add/">添加</a>
 <table  border="1" bordercolor="#4ab902" cellpadding=3 cellspacing=1 class=css_table bgcolor='#E1E1E1' >
 <thead>
 	<tr>
	<th width=10%>操作</th>
 	<th>ID</th>
 	<th>分类名称</th>
 	<th>备注</th>
 	</tr>
 </thead>
 <tbody>
    <?php foreach($this->paginator as $classes): ?>
 	<tr align="center">
	<td><a href="<?php echo $this->baseUrl; ?>/admin/classes/edit/id/<?php echo $this->escape($classes['id']) ?>">Edit</a>|<a href="<?php echo $this->baseUrl; ?>/admin/classes/del/id/<?php echo $this->escape($classes['id']) ?>" onclick="javascript:if(!confirm('您确定要删除吗？')){return false;}">Delete</a></td>
 	<td><?php echo $this->escape($classes['id']) ?></td>
 	<td><?php echo $this->escape($classes['classname']) ?></td>
 	<td><?php echo $this->escape($classes['remark']) ?></td>
 	</tr>
 	<?php endforeach; ?>
 </tbody>
 </table>
 <?php echo $this->paginationControl($this->paginator, 'Sliding', 'page.phtml'); ?>
<?php endswitch; ?>
 </body>
</html>
